package com.arvato.minipro.controller.front.pubaccount;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.arvato.minipro.bean.bean_dto.common.Result;
import com.arvato.common.https.WxPublicAccountRequestUtil;
import com.arvato.minipro.controller.BaseController;

/**
 * 
 * @author: smallking
 * 
 * @Descibe:处理微信公众号模板消息的Controller
 * 
 * @Date: 2018年4月16日  下午2:24:05
 */
@Controller
@RequestMapping(value="/pubaccount/temmsg")
public class TemplateMessageController extends BaseController{
	
	@Autowired
	private WxPublicAccountRequestUtil wxPublicAccountRequestUtil;
	
	
	/**
	 * 获取模板消息列表
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/list")
	public Result templateMsgList() {
		return wxPublicAccountRequestUtil.templateMsgList();
	}
	
	@ResponseBody
	@RequestMapping(value = "/send")
	public Result sendTemplatMsgList(String templateId, String openId, String url) {
		return wxPublicAccountRequestUtil.sendTemplateMsg(templateId, openId, url);
	}
}
